apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

dependencies {
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.fragment:fragment-ktx:1.3.0'
    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation 'androidx.work:work-runtime-ktx:2.5.0'
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.30'

    implementation 'com.google.android.material:material:1.3.0'
    implementation 'com.google.code.gson:gson:2.8.6'

    implementation 'com.github.fennifith:Crasher:0.0.2'

    testImplementation 'junit:junit:4.13'
    testImplementation 'io.mockk:mockk:1.10.5'
    testImplementation 'org.hamcrest:hamcrest:2.2'
    testImplementation 'org.exparity:hamcrest-date:2.0.7'
    testImplementation 'com.github.IvanShafran:shared-preferences-mock:1.0'
}

android {
    compileSdkVersion 30

    defaultConfig {
        versionCode 56
        versionName "71.0.0"
        minSdkVersion 21
        targetSdkVersion 30
        vectorDrawables.useSupportLibrary = true
    }

    buildTypes {
        release { //TODO mal reingucken
            minifyEnabled false
            shrinkResources false
        }
    }

    compileOptions {
        encoding = "UTF-8"
        coreLibraryDesugaringEnabled true
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    packagingOptions {
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/README'
        exclude 'META-INF/README.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
    }

    testOptions {
        // workaround for the error "Method i in android.util.Log not mocked" (http://tools.android.com/tech-docs/unit-testing-support#TOC-Method-...-not-mocked.-)
        // without PowerMockito it is impossible to mock Log.
        unitTests.returnDefaultValues = true
        unitTests.includeAndroidResources = true
        unitTests.all {
            // All the usual Gradle options.
            testLogging {
                events "passed", "skipped", "failed", "standardOut", "standardError"
                outputs.upToDateWhen {false}
                showStandardStreams = true
            }
        }
    }
}
repositories {
    mavenCentral()
}
